
{extend name='index@template/base'}{/extend}
{block name='style'}
<!--<link rel="stylesheet" href="__STATIC__/plugins/sui/sui.min.css">-->
<style>
    body{
        font-size: 13px;
    }
    h4{font-size: 15px;font-weight: 600;}
    .wrapper{
        margin: 20px;
    }
    .order-step{
        border: 1px solid #f2f2f2;
        margin:0 0 20px;
        padding:0 15px;
    }
    .order-container{
        position: relative;
        overflow: hidden;
        border: 1px solid #f2f2f2;
        margin:0 0 20px;
    }
    .order-detail{
        position: relative;
        overflow: hidden;
        border: 1px solid #f2f2f2;
        margin: 0;
    }
    .order-container .order-container-left{
        float: left;
    }
    .ordertable{
        margin-bottom:10px;
    }
    .ordertable tr td {
        padding: 5px 5px 0;
        vertical-align: top;
    }

    .order-container .order-container-right{
        float: left;
    }

</style>
{/block}
{block name='script'}
<!--<script src="__STATI__/plugins/sui/sui.min.js"></script>-->
{/block}
{block name='content'}
    <div class="row order-container">
        <div class="order-container-left col-sm-6">
            <div class="panel-body">
                <h4 class="m-t-none m-b">订单信息</h4>
                <div class="form-group" style="padding:0 10px;">
                    <table class="ordertable" style="table-layout:fixed">
                        <tbody>    <tr>
                            <td style="width:80px">下单时间：</td>
                            <td style="word-break: break-all;white-space: normal">{$order_data.order_time}</td>
                        </tr><tr>
                            <td style="width:80px">订单编号：</td>
                            <td>{$order_data.order_sn}</td>
                        </tr>

                        <tr>
                            <td>订单金额：</td>
                            <td>￥{$order_data.order_amount}</td>
                        </tr>
                        <tr>
                            <td style="width:80px">付款方式：</td>
                            <td>{if $order_data.flag_delivery == 0}在线支付{/if}
                                {if $order_data.flag_delivery == 1}货到付款{/if}
                            </td>
                        </tr>
                        <tr>
                            <td>买家：</td>
                            <td>{$order_data.account_name}</td>
                        </tr>
                        </tbody>
                    </table>
                    <table class="ordertable" style="table-layout:fixed;border-top:1px dotted #ccc">
                        <tbody>
                        <!--<tr>-->
                            <!--<td style="width:80px">配送方式：</td>-->
                            <!--<td>-->
                                <!--快递-->
                            <!--</td>-->
                        <!--</tr>-->
                        <tr>
                            <td style="width:80px">收货人：</td>
                            <td style="word-break: break-all;white-space: normal">
                                {$order_data.o_province} {$order_data.o_city} {$order_data.o_district} {$order_data.o_address}, {$order_data.account_name}, {$order_data.o_mobile}
                            </td>
                        </tr>
                        <tr>
                            <td style="width:80px"></td>
                            <!--<td style="word-break: break-all;white-space: normal"><a class="btn btn-primary btn-xs" data-toggle="ajaxModal" href="#">编辑收货信息</a></td>-->
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="order-container-right col-sm-6">
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-2 control-label" style="padding-top:10px;">订单状态: </div>
                    <div class="col-sm-9 col-xs-12">
                        <h4>
                            <span class="text-primary">
                                    {$order_data.flag_status.text}

                            </span>
                        </h4>
                    </div>
                </div>
                <div class="row">
                    <table class="ordertable" style="margin: 30px 0 0 10px">
                            <tbody>
                            <tr>
                                <td style="width:80px">配送员：</td>
                                <td style="word-break: break-all;white-space: normal">{$order_data.delivery_name}</td>
                            </tr>
                            </tbody>
                        </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row order-detail">
        <div class="box">
            <div class="box-header">
                <h4>商品详情</h4>
            </div>
            <!-- /.box-header -->
            <div class="box-body no-padding">
                <table class="table .table-bordered" style="text-align: center">
                    <tbody>
                    <tr class="active">
                        <th style="text-align: center">商品图片</th>
                        <th style="text-align: center">标题</th>
                        <th style="text-align: center">单价</th>
                        <th style="text-align: center">购买数量</th>
                        <th style="text-align: center">总价</th>
                    </tr>

                    {volist name="data" id="vo1"}
                        <tr>
                            <td style="text-align: left;width: 10%;"><div><span class="badge">商家:{$vo1.name}</span></div></td>
                            <td colspan="4"></td>
                        </tr>
                        {volist name=":get_goods_list($vo1.item_order_id)" id="vo"}
                            <tr>
                                <td><img src="__ROOT__/public/admin/static/upload/{$vo.filename}" alt="" style="width:60px;height: 60px;"></td>
                                <td style="vertical-align: middle">{$vo.name}</td>
                                <td style="vertical-align: middle">￥<script>var price=parseFloat("{$vo.price}").toFixed(2); document.write(price)</script> </td>
                                <td style="vertical-align: middle">{$vo.quantity}</td>
                                <td style="vertical-align: middle"><span class="badge bg-red">￥<script>var price=parseFloat("{$vo.amount}").toFixed(2); document.write(price)</script></span></td>
                            </tr>
                        {/volist}
                    {/volist}

                    </tbody>
                </table>
            </div>
            <!-- /.box-body -->
        </div>
    </div>

</div>
{/block}
{block name='script_extra'}

<script>
    $("#form").Validform({
        tiptype:2,
        showAllError:true,
        ajaxPost: true,
        callback: function (res) {
            if (res.success == true){

                layer.msg(res.message, {time: 1000},function () {
                    layer_close();
                    parent.$('#table').bootstrapTable('refresh');
                });
            }else{
                layer.alert(res.message);
            }
        }
    });
</script>
{/block}